package net.guruqu.rvoView;

import java.io.Serializable;
import java.util.LinkedList;

import com.jme.math.Vector2f;

public class RvoSetupInfo implements Serializable {
	LinkedList<MapAgent> mapAgents;
	LinkedList<Vector2f> controlPoints;
	LinkedList<LinkedList<Vector2f>> roadMaps;
	LinkedList<Vector2f[]> controlPointsEdge;
	float groundLevel;

	public float getGroundLevel() {
		return groundLevel;
	}

	public LinkedList<Vector2f[]> getControlPointsEdge() {
		return controlPointsEdge;
	}

	public void setGroundLevel(float groundLevel) {
		this.groundLevel = groundLevel;
	}

	public RvoSetupInfo() {
		mapAgents = new LinkedList<MapAgent>();
		controlPoints = new LinkedList<Vector2f>();
		roadMaps = new LinkedList<LinkedList<Vector2f>>();
		controlPointsEdge = new LinkedList<Vector2f[]>();
	}

	public void setAgents(AgentGroup group) {
		mapAgents.addAll(group.getAgents());
	}
	
	public void setControlPoints(ControlPointGroup controlPointGroup) {
		controlPoints.addAll(controlPointGroup.getControlPoints());
		controlPointsEdge.addAll(controlPointGroup.getRoadMapEdge());
	}

	public void setRoadMap(RoadMapGroup group) {
		for (RoadMapUnit e : group.getRoadMapUnits()) {
			roadMaps.add(e.vertices);
		}
	}

	public LinkedList<MapAgent> getMapAgents() {
		return mapAgents;
	}

	public LinkedList<Vector2f> getControlPoints() {
		return controlPoints;
	}

	public LinkedList<LinkedList<Vector2f>> getRoadMaps() {
		return roadMaps;
	}

	public void setMapAgents(LinkedList<MapAgent> mapAgents) {
		this.mapAgents = mapAgents;
	}

	public void setControlPoints(LinkedList<Vector2f> controlPoints) {
		this.controlPoints = controlPoints;
	}

	public void setRoadMaps(LinkedList<LinkedList<Vector2f>> roadMaps) {
		this.roadMaps = roadMaps;
	}

	public void setControlPointsEdge(LinkedList<Vector2f[]> controlPointsEdge) {
		this.controlPointsEdge = controlPointsEdge;
	}
}
